struct TreeNode
{
	int val;
	struct TreeNode* left;
	struct TreeNode* right;
};

struct TreeNode* invertTree(struct TreeNode* root)
{
	if(root == NULL)
		return NULL;

	struct TreeNode* pnode;//临时变量
	/*交换左右节点的地址*/
	pnode = root->left;	
	root->left = root->right; 
	root->right = pnode;
	
	invertTree(root->left);//递归			 
	invertTree(root->right);//递归
	
	return root;
}

